<?php
namespace Site\Widget;
use Think\Controller;

class ImageWidget extends Controller {

    public function upload($data){
        $this->assign(array(
            'name'  =>  v($data,'name','image'),
            'maxwidth' =>  v($data,'maxwidth','100%'),
            'maxheight'=>  v($data,'maxheight','100%'),
            'url'   =>  v($data,'url','/static/images/image-background.png')
        ));
        return $this->fetch('Widget:upload');
    } 
}
?>
